<template>
	<view class="box">
		<view class="box1">
			<image src="../../static/image/地址.png"></image>
			<view class="address" @click="show = true" >
				<input v-model="city" type="text"
				 disabled class="text" placeholder="地区（必填）"/>
				<u-picker mode="region" v-model="show" @confirm="getCity"></u-picker>
			</view>
		</view>
		<view class="box2">
			<u-search shape="round" :clearabled="true" :animation="true" bg-color="#fff"></u-search>
			<view class="a1">
				搜索
			</view>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				params: {
					province: true,
					city: true,
					area: true
				},
				city: null,
				
			}
		},
		methods: {
			getCity(e) {
				console.log(this.city);
				this.city = e.province.label + e.city.label + e.area.label
			}
		}
	}
</script>

<style lang="scss">
	.box{
		background-color: #63c68f;
		height: 30vh;
		border-radius: 35rpx 35rpx 35rpx 35rpx;
		.box1{
			padding-top: 6vh;
			font-size: 36rpx;
			display: flex;
			image{
				padding-left: 2vh;
				width: 4vh;
				height: 4vh;
			}
			.address{
				color: #fff;
				input{					
				}
			}
		}
		.box2{
			width: 90%;
			margin: auto;
			padding-top: 3vh;
			position: relative;
			.a1{
				color: #fff;
				background-color: #49ba7c;
				border-radius: 40rpx;
				padding: 10rpx 35rpx;
				position: absolute;
				right: 0.5vh;
				bottom: 0.3vh;
			}
		}
		
	}
</style>
